package com.tjbklx1.thread.chap09.demo02;

import java.util.concurrent.Callable;

public class Host {

	public Data request(final int count, final char c) {
		System.out.println("    request(" + count + "," + c + " BEGIN )");
		final FutureData futureData = new FutureData(new Callable<RealData>() {
			public RealData call() throws Exception {
				return new RealData(count, c);
			}
		});
//		new Thread() {
//			public void run() {
//				RealData realData = new RealData(count, c);
//				futureData.setContent(realData);
//			};
//		}.start();
		new Thread(futureData).start();
		System.out.println("    request(" + count + "," + c + " END )");
		return futureData;
	}

}
